#include <cmath>
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <map>
#include <set>
#include <cstring>
#define endl "\n"
using namespace std;
int main()
{
	int a[10];
	int b,k=0;
	for (int i = 0; i < 10; i++)
	{
		cin >> a[i];
	}
	cin>> b;
	b = b + 30;
	for (int i = 0; i < 10; i++)
	{
		if (a[i] <= b)
			k++;
	}
	cout << k;
	return 0;
}